/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejb.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Trasheur
 */
@Entity
@Table(name = "OPERATIONS_BATCH")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "OperationsBatch.findAll", query = "SELECT o FROM OperationsBatch o"),
    @NamedQuery(name = "OperationsBatch.findByIdOperation", query = "SELECT o FROM OperationsBatch o WHERE o.idOperation = :idOperation")})
public class OperationsBatch implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_OPERATION")
    private Integer idOperation;

    public OperationsBatch() {
    }

    public OperationsBatch(Integer idOperation) {
        this.idOperation = idOperation;
    }

    public Integer getIdOperation() {
        return idOperation;
    }

    public void setIdOperation(Integer idOperation) {
        this.idOperation = idOperation;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idOperation != null ? idOperation.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof OperationsBatch)) {
            return false;
        }
        OperationsBatch other = (OperationsBatch) object;
        if ((this.idOperation == null && other.idOperation != null) || (this.idOperation != null && !this.idOperation.equals(other.idOperation))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ejb.OperationsBatch[ idOperation=" + idOperation + " ]";
    }
}
